//app.js
App({
  onLaunch: function () {
    this.getSystemInfo();
    const Verify = require('/verify_mpsdk/main');
    Verify.init();
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    var that = this;

    wx.getSystemInfo({
      success: res => {
        //导航高度
        this.globalData.navHeight = res.statusBarHeight + 46;
        that.globalData.screenWidth = res.screenWidth;
      }, fail(err) {
        console.log(err);
      }
    });
    // 获取系统信息，我的简历中的底部提交按钮做适配
    wx.getSystemInfo({
      success: (res) => {
        // console.log(res)
        let modelmes = res.model; //手机品牌
        console.log('手机品牌', modelmes)
        if (/iphone\sx/i.test(res.model)
          || (/iphone/i.test(res.model) && /unknown/.test(res.model))
          || /iphone\s11/.test(res.model)) {
          that.globalData.isIpx = true;
        } else {
          that.globalData.isIpx = false;
        }
        console.info(that.globalData.isIpx + '========');
        that.globalData.modelmes = res.model
        that.globalData.windowHeight = res.windowHeight
        that.globalData.showmenus = false
      },
    })
  },
  getSystemInfo: function () {
    let t = this;
    wx.getSystemInfo({
      success: function (res) {
        t.globalData.systemInfo = res;
      }
    });
  },
  globalData: {
    userInfo: null,
    navHeight: 0,
    userInfo: "",
    screenWidth:0,
    isIpx: false,   //适配IPhoneX
    modelmes: '',
    // url: "http://localhost:8089/test1/",
    // urlFile: "http://localhost:8080/jiweishengxian",
    // url: "http://www.jwsxmall.com:8089/test1/",

    url: "https://www.jwsxmall.com/jiweishengxian/",
    urlFile: "https://www.jwsxmall.com/jiweishengxian",
  },
})




